{extend name="base" /}
{block name="content"}
<div class="col-xs-12 col-sm-9 col-lg-10">
    <ol class="breadcrumb" style="background-color: #f9f9f9;padding:8px 0;margin-bottom:10px;">
        <li>
            <a href=""><i class="fa fa-cogs"></i>
                栏目管理</a>
        </li>
        <li class="active">
            <a href="">栏目添加</a>
        </li>

    </ol>
    <ul class="nav nav-tabs" role="tablist">
        <li><a href="{:url('index')}">栏目列表</a></li>
        <li class="active"><a href="">edit栏目</a></li>
    </ul>
    <form class="form-horizontal" id="form" action="" method="post">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">栏目管理</h3>
            </div>
            <div class="panel-body">
                <div class="form-group">
                    <label for="" class="col-sm-2 control-label">栏目名称</label>
                    <div class="col-sm-9">
                        <input type="text" name="cate_name"  class="form-control" value="{$oldData['cate_name']}" placeholder="">
                    </div>
                </div>
                <div class="form-group">
                    <label for="" class="col-sm-2 control-label">所属栏目</label>
                    <div class="col-sm-9">
                        <select class="js-example-basic-single form-control" name="cate_pid">
                            <option value="0">Top Column</option>
                            {foreach $data as $vo}
                                <option {if condition="$oldData['cate_pid']==$vo['cate_id']"} selected="selected" {/if} value="{$vo['cate_id']}">{$vo['_cate_name']}</option>
                            {/foreach}
                        </select>
                    </div>
                </div>
            
                <div class="form-group">
                    <label for="" class="col-sm-2 control-label">栏目排序</label>
                    <div class="col-sm-9">
                        <input type="number" name="cate_sort" value="{$oldData['cate_sort']}"  class="form-control" placeholder="">
                    </div>
                </div>
            </div>
        </div>
        <input type="hidden" name="cate_id" value="{$oldData['cate_id']}">
        <button class="btn btn-primary" type="submit">确定</button>
    </form>

</div>
{/block}